<script type="text/javascript">
$(function() {
	var url = '${contextPath}script/sys/main.js?time=' + sys_get_time();
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			var page = sys_fill_parm('queryMainForm');
		}
	});
	
	var date = new Date();
	var d = date.getDate();
	var m = date.getMonth();
	var y = date.getFullYear();
	
	$('#calendar').fullCalendar({
		defaultView: 'month',
		editable: false,
		allDayText:'全天',
		//theme: true,
        header: {
           left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
        monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
        dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
        dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
        today: ["今天"],
        firstDay: 1,
        axisFormat:'HH(:mm)tt',
        minTime:7,
        buttonText: {
            today: '今天',
            month: '月',
            week: '周',
            day: '日'
        },
        selectable: true,
		selectHelper: true,
		select: function(start, end, allDay) {
           	var parm = {'start':($.fullCalendar.formatDate(start,'yyyy-MM-dd hh:mm')), 'end':($.fullCalendar.formatDate(end,'yyyy-MM-dd hh:mm')), 'allDay':allDay};
        	var url = '${contextPath}main-editMemo.html?time=' + sys_get_time();
        	$.colorbox({overlayClose:false, href:url, data:parm, close:'[关闭]', width:'450px', height:'350px', open:true});
		},
		events: '${contextPath}main-showMemo.html?time=' + sys_get_time(),
		eventClick: function(event, element) {
			if(event.code == null){
			var parm = {'start':($.fullCalendar.formatDate(start,'yyyy-MM-dd hh:mm')), 'end':($.fullCalendar.formatDate(end,'yyyy-MM-dd hh:mm')), 'allDay':allDay};
			}else {
			var parm = {'code':event.code};
			}
			var url = '${contextPath}main-editMemo.html?time=' + sys_get_time();
			$.colorbox({overlayClose:false, href:url, data:parm, close:'[关闭]', width:'450px', height:'350px', open:true});
	    }
	});
	
	sys_load_message();
});
</script>


<div id="calendar" style="width:400px; height:500px; float:left;" class="row-fluid">
<!-- <div id="mainResultList" style="width:400px; float:left; margin-right:20px; margin-top: 20px;">
	<table class="table table-bordered">
		<thead>
			<tr class="ui-widget-header">
				<th>操作人</th>
				<th>操作时间</th>
				<th>操作模块</th>
				<th>所做的操作</th>
			</tr>
		</thead>
		<#list list as log>
		<tr class="ui-widget-content">
			<td>${(log.cu)!''}</td>
			<td>${log.ct?string("yyyy-MM-dd HH:mm:ss")!''}</td>
			<td>${(log.module)!''}</td>
			<td>${(log.operation)!''}</td>
		</tr>
		</#list>
	</table>
</div> -->
</div>
<div>
<div id="mainResultList" style="width:500px; float:right; margin-left:20px;">
	<table class="table table-striped">
		<thead>
			<tr>
				<th colspan="2" style="text-align:center;">公告<a href="javascript:;" style="float:right;" onclick="javascript: sys_load_handle('annCollect'); return false;">更多>></a></th>
			</tr>
		</thead>
		<#list list1 as ann>
		<tr>
			<td><a href="javascript:;" onclick="javascript: sys_load_handle('ann-detail_${ann.code}'); return false;"><font color="red">${(ann.title)!''}</font></a></td>
			<td><font style="float:right;">${(ann.rt?string('yyyy-MM-dd HH:mm'))!''}</font></td>
		</tr>
		</#list>
	</table>
</div>
</div>